home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / NextAnswers / 1342_CIAC_D-25:_Automated_Scanning_of_Network_Vulnerabilities.txt < prev    next >
Text File  |  1995-06-12  |  14KB  |  291 lines

  1.                The Computer Incident Advisory Capability
  2.                           ___  __ __    _     ___
  3.                          /       |     / \   /
  4.                          \___  __|__  /___\  \___
  5.           _____________________________________________________
  6.  
  7.                               ADVISORY NOTICE
  8.  
  9.               Automated Scanning of Network Vulnerabilities
  10.  
  11.  
  12. September 30, 1993 1100 PDT                                    Number D-25
  13. __________________________________________________________________________
  14. PROBLEM:   Automated attacks on networked computers.
  15. PLATFORM:  All systems supporting TCP/IP networking.
  16. DAMAGE:    Unauthorized access to information and computer resources.
  17. SOLUTION:  Examine machines for vulnerabilities detailed below and apply
  18.            fixes as needed.
  19. __________________________________________________________________________
  20.     
  21.      Critical Information about Automated Network Scanning Software
  22.  
  23. CIAC has learned that software allowing automated scanning of networked
  24. computers for security vulnerabilities was recently made publicly
  25. available on the Internet.  The software package, known as ISS or Internet
  26. Security Scanner, will interrogate all computers within a specified IP
  27. address range, determining the security posture of each with respect to
  28. several common system vulnerabilities.  The software was designed as a
  29. security tool for system and network administrators.  However, given its
  30. wide distribution and ability to scan remote networks, CIAC feels that it
  31. is likely ISS will also be used to locate vulnerable hosts for malicious
  32. reasons.
  33.  
  34. While none of the vulnerabilities ISS checks for are new, their
  35. aggregation into a widely available automated tool represents a higher
  36. level of threat to networked machines.  CIAC has analyzed the operation of
  37. the program and strongly recommends that administrators take this
  38. opportunity to re-examine systems for the vulnerabilities described below.
  39. Also detailed below are available security tools that may assist in the
  40. detection and prevention of malicious use of ISS.  Finally, common
  41. symptoms of an ISS attack are outlined to allow detection of malicious
  42. use.
  43.  
  44.  
  45. ISS Vulnerabilities
  46. -------------------
  47.  
  48. The following vulnerabilities are tested for by the ISS tool.
  49. Administrators should verify the state of their systems and perform
  50. corrective actions as indicated.
  51.  
  52. Default Accounts   The accounts "guest" and "bbs", if they exist, should
  53.                    have non-trivial passwords.  If login access to these
  54.                    accounts is not needed, they should be disabled by
  55.                    placing a "*" in the password field and the string
  56.                    "/bin/false" in the shell field in /etc/passwd.  See
  57.                    the system manual entry for "passwd" for more
  58.                    information on changing passwords and disabling
  59.                    accounts.
  60.  
  61.                    For example, the /etc/passwd entry for a disabled guest
  62.                    account should resemble the following:
  63.  
  64.                    guest:*:2311:50:Guest User:/home/guest:/bin/false
  65.  
  66. lp Account         The account "lp", if it exists, should not allow logins.
  67.                    It should be disabled by placing a "*" in the password
  68.                    field and the string "/bin/false" in the shell field in
  69.                    /etc/passwd.
  70.  
  71. Decode Alias       Mail aliases for decode and uudecode should be disabled
  72.                    on UNIX systems.  If the file /etc/aliases contains
  73.                    entries for these programs, they should be disabled by
  74.                    placing a "#" at the beginning of the line and then
  75.                    executing the command "newaliases".  Consult the manual
  76.                    page for "aliases" for more information on UNIX mail
  77.                    aliases.
  78.  
  79.                    A disabled decode alias should appear as follows:
  80.  
  81.                    # decode: "|/usr/bin/uudecode"
  82.  
  83. Sendmail           The sendmail commands "wiz" and "debug" should be 
  84.  
  85.                    disabled.  This may be verified by executing the 
  86.  
  87.                    following commands:
  88.  
  89.                    % telnet hostname 25
  90.                    220 host Sendmail 5.65 ready at Wed, 29 Sep 93 20:28:46 PDT
  91.                    wiz
  92.                    You wascal wabbit!  Wandering wizards won't win!
  93.                    (or 500 Command unrecognized)
  94.                    quit
  95.  
  96.                    % telnet hostname 25
  97.                    220 host Sendmail 5.65 ready at Wed, 29 Sep 93 20:28:46 PDT
  98.                    debug
  99.                    500 Command unrecognized
  100.                    quit
  101.  
  102.                    If the "wiz" command returns "Please pass, oh mighty
  103.                    wizard", your system is vulnerable to attack.  The
  104.                    command should be disabled by adding a line to the
  105.                    sendmail.cf configuration file containing the string:
  106.  
  107.                    OW*
  108.  
  109.                    If the "debug" command responds with the string
  110.                    "200 Debug set", you should immediately obtain a newer
  111.                    version of sendmail software from your vendor.
  112.  
  113. Anonymous FTP      Anonymous FTP allows users without accounts to have
  114.                    restricted access to certain directories on the system.
  115.                    The availability of anonymous FTP on a given system may
  116.                    be determined by executing the following commands:
  117.  
  118.                    % ftp hostname
  119.                    Connected to hostname.
  120.                    220 host FTP server ready.
  121.                    Name (localhost:jdoe): anonymous
  122.                    530 User anonymous unknown.
  123.                    Login failed.
  124.  
  125.                    The above results indicate that anonymous FTP is not
  126.                    enabled.  If the system instead replies with the
  127.                    string "331 Guest login ok" and then prompts for a 
  128.  
  129.                    password, anonymous FTP access is enabled.
  130.  
  131.                    The configuration of systems allowing anonymous FTP
  132.                    should be checked carefully, as improperly configured
  133.                    FTP servers are frequently attacked.  Refer to CIAC
  134.                    Bulletin D-19 for more information.
  135.  
  136. NIS                SunOS 4.x machines using NIS are vulnerable unless the
  137.                    patch 100482 has been installed.  See CIAC Bulletin
  138.                    C-25 for more information regarding this patch.
  139.  
  140. NFS                Filesystems exported under NFS should be mountable only
  141.                    by a restricted set of hosts.  The UNIX "showmount"
  142.                    command will display the filesystems exported by a given
  143.                    host:
  144.  
  145.                    % /usr/etc/showmount -e hostname
  146.                    export list for hostname:
  147.                    /usr          hosta:hostb:hostc
  148.                    /usr/local    (everyone)
  149.  
  150.                    The above output indicates that this NFS server is
  151.                    exporting two partitions: /usr, which can be mounted by
  152.                    hosta, hostb, and hostc; and /usr/local which can be
  153.                    mounted by anyone.  In this case, access to the
  154.                    /usr/local partition should be restricted.  Consult the
  155.                    system manual entry for "exports" or "NFS" for more
  156.                    information.
  157.  
  158. rusers             The UNIX rusers command displays information about
  159.                    accounts currently active on a remote system.  This may
  160.                    provide an attacker with account names or other
  161.                    information useful in mounting an attack.  To check for
  162.                    the availability of rusers information on a particular
  163.                    machine, execute the following command:
  164.  
  165.                    % rusers -l hostname
  166.                    hostname: RPC: Program not registered
  167.  
  168.                    If the above example had instead generated a list of
  169.                    user names and login information, a rusers server is
  170.                    running on the host.  The server may be disabled by
  171.                    placing a "#" at the beginning of the appropriate line
  172.                    in the file /etc/inetd.conf and then sending the SIGHUP
  173.                    signal to the inetd process.  For example, a disabled
  174.                    rusers entry might appear as follows:
  175.  
  176.                    #rusersd/2 dgram rpc/udp wait root /usr/etc/rusersd rusersd
  177.  
  178. rexd               The UNIX remote execution server rexd provides only
  179.                    minimal authentication and is easily subverted.  It
  180.                    should be disabled by placing a "#" at the beginning of
  181.                    the rexd line in the file /etc/inetd.conf and then
  182.                    sending the SIGHUP signal to the inetd process.  The
  183.                    disabled entry should resemble the following:
  184.  
  185.                    #rexd/1 stream rpc/tcp wait root /usr/etc/rexd rexd
  186.  
  187. Available Tools
  188. ---------------
  189.  
  190. There are several available security tools that may be used to prevent or
  191. detect malicious use of ISS.  They include the following:
  192.  
  193. SPI                SPI, the Security Profile Inspector, will detect the
  194.                    system vulnerabilities described above, as well as many
  195.                    others.  U.S. Government agencies interested in 
  196.  
  197.                    obtaining SPI should send E-mail to spi@cheetah.llnl.gov
  198.                    or call (510) 422-3881 for more information.
  199.  
  200. COPS               The COPS security tool will also detect the
  201.                    vulnerabilities described above.  It is available via
  202.                    anonymous FTP from ftp.cert.org in the directory
  203.                    /pub/tools/cops/1.04.
  204.  
  205. ISS                Running ISS on your systems will provide you with the
  206.                    same information an attacker would obtain, allowing you
  207.                    to correct vulnerabilities before they can be exploited.
  208.                    Note that the current version of the software is known
  209.                    to function poorly on some operating systems.  If you
  210.                    should have difficulty using the software, please contact
  211.                    CIAC for assistance.  ISS may be obtained via anonymous
  212.                    FTP from ftp.uu.net in the directory 
  213.  
  214.                    /usenet/comp.sources.misc/volume39/iss.
  215.  
  216. TCP Wrappers       Access to most UNIX network services can be more closely
  217.                    controlled using software known as a TCP wrapper.  The
  218.                    wrapper provides additional access control and flexible
  219.                    logging features that may assist in both the prevention
  220.                    and detection of network attacks.  This software is
  221.                    available via anonymous FTP from ftp.win.tue.nl in the
  222.                    file /pub/security/tcp_wrappers_6.0.shar.Z
  223.  
  224.  
  225. Detecting an ISS Attack
  226. -----------------------
  227.  
  228. Given the wide distribution of the ISS tool, CIAC feels that remote
  229. attacks are likely to occur.  Such attacks can cause system warnings to be
  230. generated that may prove useful in tracking down the source of the attack.
  231. The most probable indicator of an ISS attack is a mail message sent to
  232. "postmaster" on the scanned system similar to the following:
  233.  
  234.     From: Mailer-Daemon@hostname (Mail Delivery Subsystem)
  235.     Subject: Returned mail: Unable to deliver mail
  236.     Message-Id: <9309291633.AB04591@>
  237.     To: Postmaster@hostname
  238.  
  239.        ----- Transcript of session follows -----
  240.     <<< VRFY guest
  241.     550 guest... User unknown
  242.     <<< VRFY decode
  243.     550 decode... User unknown
  244.     <<< VRFY bbs
  245.     550 bbs... User unknown
  246.     <<< VRFY lp
  247.     550 lp... User unknown
  248.     <<< VRFY uudecode
  249.     550 uudecode... User unknown
  250.     <<< wiz
  251.     500 Command unrecognized
  252.     <<< debug
  253.     500 Command unrecognized
  254.     421 Lost input channel to remote.machine
  255.  
  256.        ----- No message was collected -----
  257.  
  258. If you should receive such a message, it is likely that your machine and
  259. others on your network have been scanned for vulnerabilities.  You should
  260. immediately contact your computer security officer or CIAC for assistance
  261. in assessing the damage and taking corrective action.
  262.  
  263.  
  264. For additional information or assistance, please contact CIAC at 
  265.  
  266. (510) 423-9878 or send E-mail to ciac@llnl.gov. FAX messages to
  267. (510) 423-8002.
  268.  
  269. PLEASE NOTE: Many users outside of the DOE and ESnet computing communities
  270. receive CIAC bulletins.  If you are not part of these communities, please
  271. contact your agency's response team to report incidents.  Your agency's team
  272. will coordinate with CIAC.  The Forum of Incident Response and Security Teams
  273. (FIRST) is a world-wide organization.  A list of FIRST member organizations
  274. and their constituencies can be obtained by sending email to
  275. docserver@first.org with an empty subject line and a message body containing
  276. the line: send first-contacts.
  277.  
  278. This document was prepared as an account of work sponsored by an agency of
  279. the United States Government.  Neither the United States Government nor the
  280. University of California nor any of their employees, makes any warranty,
  281. expressed or implied, or assumes any legal liability or responsibility for
  282. the accuracy, completeness, or usefulness of any information, product, or
  283. process disclosed, or represents that its use would not infringe privately
  284. owned rights.  Reference herein to any specific commercial products, process,
  285. or service by trade name, trademark manufacturer, or otherwise, does not
  286. necessarily constitute or imply its endorsement, recommendation, or favoring
  287. by the United States Government or the University of California.  The views
  288. and opinions of authors expressed herein do not necessarily state or reflect
  289. those of the United States Government nor the University of California, and
  290. shall not be used for advertising or product endorsement purposes.
  291.